package com.flow.manager.action;

import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.ServletActionContext;
import com.flow.model.AccountType;
import com.flow.service.IAccountTypeService;

public class NumberHeadAction {

	private IAccountTypeService<AccountType> atService;
	
	public String findAllNumberHead(){
		
		HttpServletRequest request = ServletActionContext.getRequest();
		
		try {
			
			List<AccountType> nhList = atService.findAllAccountType();
			request.setAttribute("nhList", nhList);
			return null;
			
		} catch (Exception e) {

			e.printStackTrace();
			
		}
		
		return "ERROR";
		
	}

	public void setAtService(IAccountTypeService<AccountType> atService) {
		this.atService = atService;
	}
	
}
